package de.tum.se.sudoku.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public class SolutionButtonActionListener implements ActionListener {

	private IGui gui;

	public SolutionButtonActionListener(IGui gui) {
		super();
		this.gui = gui;
	}

	@Override
	public void actionPerformed(ActionEvent ae) {
		if (gui.getGrid().isValid())
			JOptionPane.showMessageDialog(null,
					"Congratulation! Sudoku solved!");
		else
			JOptionPane.showMessageDialog(null,
					"Sudoku not yet completly solved!");
	}
}
